﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ClientRegister
{
    public partial class AddRoomForm : Form
    {

        SynchronizeData sync = new SynchronizeData();

        public AddRoomForm()
        {
            InitializeComponent();
        }

        private void AddRoomForm_Load(object sender, EventArgs e)
        {
            //sync.GetDataForInsertMethodWithID(sync.RoomTb, sync.insertcol);
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            //string xml = "";
            RoomDataProvider addroom = new RoomDataProvider();
            int result = addroom.AddRoom(txtName.Text, txtCapa.Text, txtAddr.Text);
            if (result != 0)
            {
                ////chuyen thong phong hoc len server
                //xml = addroom.SelectAndConvertXMLRoom(txtName.Text);
                //sync.transfDataForInsertMethod(xml, sync.insertcol);

                MessageBox.Show("Đã thêm phòng học");
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
